<?php
class Pages extends CI_Controller {

	public function view($page = 'home')
	{
		if ( ! file_exists('application/views/pages/'.$page.'.php'))
		{
			// Whoops, we don't have a page for that!
			show_404();
		}

		// load calendar library and pass the calendar to the home view that generates it
		$this->load->library('calendar');
		$data['calendar'] = $this->calendar->generate();
		
		$this->load->helper('url');
		
		$this->load->view('templates/standard_header');
		$this->load->view('pages/'.$page, $data);
		$this->load->view('templates/footer');
	}
	
}